// analysis.h : CRecordAnalysis 


// code creation in 16 July 2010, 15:06

#include "stdafx.h"
#include "analysis.h"
IMPLEMENT_DYNAMIC(CRecordAnalysis, CRecordset)

CRecordAnalysis::CRecordAnalysis(CDatabase* pdb)
	: CRecordset(pdb)
{
	m_ID = 0;


/*	m_membrane = L"";
	m_processing = L"";
	m_relation = L"";
	m_combination = L"";*/

	m_ChannelComb = L"";
//	m_fHue = 0.0;
	m_volumesum = 0.0;
	m_volumeaverage = 0.0;
	m_volumemax = 0.0;
	m_volumemin = 0.0;
	m_distribution = L"";
	
	m_number = 0;
	m_nFields = 8;
	m_nDefaultType = dynaset;
}

CString CRecordAnalysis::GetDefaultConnect()
{
//	return _T("DSN=particle;DBQ=..\\ImageSegment\\particle analysis.mdb;DefaultDir=..\\ImageSegment;DriverId=25;FIL=MicrosoftAccess;MaxBufferSize=2048;PageTimeout=5;UID=admin;");

	return _T("DSN=particle;DBQ=.\\particle analysis.mdb;DefaultDir=..\\ImageSegment;DriverId=25;FIL=MicrosoftAccess;MaxBufferSize=2048;PageTimeout=5;UID=admin;");
//	return TRUE;

}

CString CRecordAnalysis::GetDefaultSQL()
{
	return _T("[analysis]");
}

void CRecordAnalysis::DoFieldExchange(CFieldExchange* pFX)
{
	pFX->SetFieldType(CFieldExchange::outputColumn);

	RFX_Long(pFX, _T("[ID]"), m_ID);

	/*
	RFX_Text(pFX, _T("[membrane]"), m_membrane);
	RFX_Text(pFX, _T("[processing]"), m_processing);
	RFX_Text(pFX, _T("[relation]"), m_relation);
	RFX_Text(pFX, _T("[combination]"), m_combination);*/

	
	RFX_Double(pFX, _T("[volume sum(um3)]"), m_volumesum);
	RFX_Double(pFX, _T("[volume average(um3)]"), m_volumeaverage);
	RFX_Double(pFX, _T("[volume max(um3)]"), m_volumemax);
	RFX_Double(pFX, _T("[volume min(um3)]"), m_volumemin);
	RFX_Text(pFX, _T("[distribution]"), m_distribution);
	RFX_Text(pFX, _T("[Channel]"), m_ChannelComb);

//	RFX_Single(pFX, _T("[hue]"), m_fHue);
	RFX_Long(pFX, _T("[number]"), m_number);

}
/////////////////////////////////////////////////////////////////////////////
// CRecordAnalysis diagnose

#ifdef _DEBUG
void CRecordAnalysis::AssertValid() const
{
	CRecordset::AssertValid();
}

void CRecordAnalysis::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG


